<script>
	import {
		mapMutations
	} from 'vuex'
	import {
		version
	} from './package.json'
	// import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update';

	export default {
		onLaunch: function() {
			// #ifdef H5
			console.log(
				`%c hello uniapp %c v${version} `,
				'background:#35495e ; padding: 1px; border-radius: 3px 0 0 3px;  color: #fff',
				'background:#007aff ;padding: 1px; border-radius: 0 3px 3px 0;  color: #fff; font-weight: bold;'
			)
			// #endif
			// 线上示例使用
			// console.log('%c uni-app官方团队诚邀优秀前端工程师加盟，一起打造更卓越的uni-app & uniCloud，欢迎投递简历到 hr2013@dcloud.io', 'color: red');
			console.log('App Launch');
			// #ifdef APP-PLUS
			// App平台检测升级，服务端代码是通过uniCloud的云函数实现的，详情可参考：https://ext.dcloud.net.cn/plugin?id=4542
			if (plus.runtime.appid !== 'HBuilder') { // 真机运行不需要检查更新，真机运行时appid固定为'HBuilder'，这是调试基座的appid
				// checkUpdate()
			}

			// 一键登录预登陆，可以显著提高登录速度
			uni.preLogin({
				provider: 'univerify',
				success: (res) => {
					// 成功
					this.setUniverifyErrorMsg();
					console.log("preLogin success: ", res);
				},
				fail: (res) => {
					this.setUniverifyLogin(false);
					this.setUniverifyErrorMsg(res.errMsg);
					// 失败
					console.log("preLogin fail res: ", res);
				}
			})
			// #endif
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		globalData: {
			test: ''
		},
		methods: {
			...mapMutations(['setUniverifyErrorMsg', 'setUniverifyLogin'])
		}
	}
</script>

<style>
	/* #ifndef APP-PLUS-NVUE */
	/* uni.css - 通用组件、模板样式库，可以当作一套ui库应用 */
	@import './common/uni.css';
	/* @import '@/static/customicons.css'; */
	/* H5 兼容 pc 所需 */
	/* #ifdef H5 */
	@media screen and (min-width: 768px) {
		body {
			overflow-y: scroll;
		}
	}

	/* 顶栏通栏样式 */
	/* .uni-top-window {
	    left: 0;
	    right: 0;
	} */

	uni-page-body {
		/* background-color: #F5F5F5 !important; */
		min-height: 100% !important;
		height: auto !important;
	}

	.uni-top-window uni-tabbar .uni-tabbar {
		background-color: #fff !important;
	}

	.uni-app--showleftwindow .hideOnPc {
		display: none !important;
	}

	/* #endif */

	/* 以下样式用于 hello uni-app 演示所需 */
	page {
		/* background-color: #efeff4; */
		height: 100%;
		font-size: 28rpx;
		/* line-height: 1.8; */
	}

	.fix-pc-padding {
		padding: 0 50px;
	}

	.uni-header-logo {
		padding: 30rpx;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		margin-top: 10rpx;
	}

	.uni-header-image {
		width: 100px;
		height: 100px;
	}

	.uni-hello-text {
		color: #7A7E83;
	}

	.uni-hello-addfile {
		text-align: center;
		line-height: 300rpx;
		background: #FFF;
		padding: 50rpx;
		margin-top: 10px;
		font-size: 38rpx;
		color: #808080;
	}

	/* #endif*/


	
.main{ width:1280px; height: auto; display: block; float: none; margin: 0 auto;}

.fixed:after { content: "."; display: block; clear: both; height: 0; visibility: hidden; }
.fixed { display: block; min-height: 1%; }
.clear { display: block!important; float: none!important; clear: both; overflow: hidden; width: auto!important; height: 0!important; margin: 0 auto!important; padding: 0!important; font-size: 0; line-height: 0; }
/*基于display:table-cell的自适应布局*/
.cell{display:table-cell; *display:inline-block; width:2000px; *width:auto;}
/*双栏自适应cell部分连续英文字符换行*/
.cell_bk{display:table; width:100%; table-layout:fixed; word-wrap:break-word;}
/*单行文字溢出虚点显示*/
.ell{text-overflow:ellipsis; white-space:nowrap; overflow:hidden;}

html, a {-webkit-tap-highlight-color: transparent}
textarea.fixAndroidKeyboard:focus, input.fixAKeyboard:focus {-webkit-tap-highlight-color: rgba(255,255,255,0);-webkit-user-modify: read-write-plaintext-only}

.noscroll {position: absolute;width: 100%;height: 100%;overflow: hidden;}
.hidden {display: none !important;}

.top{ width: 100%; height: auto; display: block; float: left; margin:0px 0;}
.top_l{ width: 200px; height: 35px; display: block; float: left; margin:0 0;}
.top_r{  width: 200px; height: 35px; display: block; float: right; margin:0 0;}

.header{ width:100%; height: auto; display: block; float: left; margin: 20rpx 0 0; position: relative;}
.header .header_t{ width:119px; height:200px; display: block; float: left; margin:0 10px 0 0; overflow: hidden;}
.header .header_t image{ width:119px; height:400px; display: block; float: left; margin:0 0 0 0; cursor: pointer;}
.header .header_t:last-child{ margin: 0;}
.header .header_t:hover image{ margin: -200px 0 0 0;}

/* .tan{ width: 1280px; height: auto; display: block; float: left; position:fixed; background: #fff; left: 50%; z-index: 9999; top: 50%; margin: -400px 0 0 -640px;}
.tan .tan_t{ width:238px; height:400px; display: block; float: left; margin:0 22.5px 22.5px 0; overflow: hidden;}
.tan .tan_t image{ width:238px; height:800px; display: block; float: left; margin:0 0 0 0; cursor: pointer;}
.tan .tan_t:nth-child(5n){ margin: 0;}
.tan .tan_t:hover image{ margin: -400px 0 0 0;} */

.footer{ width: 100%; height: auto; display: block; float: left; margin:  0px 0 20px 0; padding:10px  0 20px 0;  border-top: 2px solid #404040; color: #000;}
.footerl{ width: auto; height: auto; display: block; float: left; margin: 0 0 0 0; font-size: 12px;}
.footerr{ width: auto; height: auto; display: block; float: right; margin: 0 0 0 0; font-size: 12px;}
</style>
